// iphonex 系列适配
.iphonex(@rules) {
  // iphonex
  /* stylelint-disable-next-line */
  @media only screen and (device-width: 375px) and (device-height: 812px) and (device-pixel-ratio: 3) {
    @rules();
  }

  // iphonex max
  /* stylelint-disable-next-line */
  @media only screen and (device-width: 414px) and (device-height: 896px) and (device-pixel-ratio: 3) {
    @rules();
  }

  // iphonexr
  /* stylelint-disable-next-line */
  @media only screen and (device-width: 414px) and (device-height: 896px) and (device-pixel-ratio: 2) {
    @rules();
  }

  // iphone14
  /* stylelint-disable-next-line */
  @media only screen and (device-width: 428px) and (device-height: 926px) and (device-pixel-ratio: 3) {
    @rules();
  }

  @supports (bottom: constant(safe-area-inset-bottom)) or
    (bottom: env(safe-area-inset-bottom)) {
    /* stylelint-disable-next-line */
    @rules();
  }
}

// iphone5(s) 系列适配（iPhone SE, 5, 5S, 5C）
.iphone5(@rules) {
  @media only screen and (device-width: 320px) and (device-height: 568px) and (device-pixel-ratio: 2) {
    @rules();
  }
}
